﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Net.Chirash.Twitter.TwitterClient;

namespace Net.Chirash.Twitter.TweetZone.WindowComponents.Containers
{
    static class ContainerFactory
    {
        #region Public Enumerations

        public enum Types
        {
            TimelineHome,
            TimelineMentions,
            Search,
            Chart,
            Users,
        }

        #endregion

        #region Public Methods

        public static Container GetContainer(Types type)
        {
            if (containers[type] == null)
            {
                switch (type)
                {
                    case Types.TimelineHome:
                        containers[type] = new TimelineContainer(TimelineTypes.Home);
                        break;
                    case Types.TimelineMentions:
                        containers[type] = new TimelineContainer(TimelineTypes.Mentions);
                        break;
                    case Types.Search:
                        containers[type] = new SearchContainer();
                        break;
                    case Types.Chart:
                        containers[type] = new ChartContainer();
                        break;
                    case Types.Users:
                        break;
                    default:
                        break;
                }

            }
            return containers[type];
        }

        #endregion

        #region Private Fields

        private static Dictionary<Types, Container> containers = new Dictionary<Types, Container>();

        #endregion
    }

}
